package com.battery.system.mapper;

import java.util.List;

import com.battery.system.domain.BO.WithdrawalBO;
import com.battery.system.domain.VO.WithdrawalVO;
import com.battery.system.domain.Withdrawal;
import org.apache.ibatis.annotations.Param;

/**
 * 提现记录Mapper接口
 *
 * @author battery
 * @date 2021-03-18
 */
public interface WithdrawalMapper {
    /**
     * 查询提现记录
     *
     * @param id 提现记录ID
     * @return 提现记录
     */
    public Withdrawal selectWithdrawalById(String id);

    /**
     * 查询提现记录列表
     *
     * @param withdrawal 提现记录
     * @return 提现记录集合
     */
    public List<Withdrawal> selectWithdrawalList(@Param("w") Withdrawal withdrawal);

    public List<Withdrawal> selectWithdrawalList(@Param("w") Withdrawal withdrawal, @Param("end") String end);

    /**
     * 新增提现记录
     *
     * @param withdrawal 提现记录
     * @return 结果
     */
    public int insertWithdrawal(Withdrawal withdrawal);

    /**
     * 修改提现记录
     *
     * @param withdrawal 提现记录
     * @return 结果
     */
    public int updateWithdrawal(Withdrawal withdrawal);

    /**
     * 删除提现记录
     *
     * @param id 提现记录ID
     * @return 结果
     */
    public int deleteWithdrawalById(String id);

    /**
     * 批量删除提现记录
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteWithdrawalByIds(String[] ids);

    /**
     * 展示提現列表
     *
     * @param withdrawalBO
     * @return
     */
    List<WithdrawalVO> selectWithdrawalVOList(@Param("withdrawalBO") WithdrawalBO withdrawalBO);

    /**
     * 需要查询该用户是否存在正在提现中的订单
     *
     * @param accountId
     * @param accountType
     * @return
     */
    Withdrawal selectOn(@Param("accountType") int accountType, @Param("accountId") String accountId);
}
